<template>
  <div class="dietnav">
    <ul class="nav1">
      <p>
        <span>为活宝儿甄选</span>
        <i class="iconfont icon-youjiantou"></i>
      </p>
      <em class="iconfont icon-fangdajing"></em>
    </ul>
    <ul class="nav2">
      <li v-for="(v, i) in arrnav" :key="i">
          {{v.title}}
      </li>
      <b class="iconfont icon-xiajiantou"></b>
    </ul>
  </div>
</template>

<script>
import getlink from '../api/getlink.js'
export default {
  props: [],
  data(){
      return{
          arrnav:[]
      }
  },
  methods:{
      
  },
  created(){
      getlink("/data/list/xiaoming").then((ok)=>{
          this.arrnav=ok.data.dietnav
          console.log(this.arrnav);
      })
  }
};
</script>

<style scoped>
.dietnav {
  width: 100%;
  position: fixed;
  top: 0;
  background-color: #fff;
}
.dietnav .nav1 {
  width: 100%;
  font-size: 0.22rem;
}
.dietnav ul {
  height: 0.5rem;
  display: flex;
  align-items: center;
  font-size: 0.18rem;
  font-weight: 700;
  text-align: center;
}
.dietnav .nav2 {
  border-top: 0.01rem solid #999;
  overflow-x: auto;
}
.dietnav p {
  background-color: #fff;
  width: 3.4rem;
}
.dietnav em {
  padding-right: 0.1rem;
}
.dietnav li {
  flex-shrink: 0;
  margin-left: 0.2rem;
  color: #999;
}
.dietnav li:nth-child(1) {
  color: black;
}
.dietnav b {
  float: right;
  width: 0.5rem;
  height: 0.5rem;
  position: fixed;
  right: 0;
  top: 0.5rem;
  text-align: center;
  line-height: 0.5rem;
  background-color: #fff;
  border-left: 0.01rem solid #999;
}
</style>